﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace KWT.DRG_DIP.API.Migrations
{
    /// <inheritdoc />
    public partial class _20250410162303 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "DeptID",
                table: "Sys_User");

            migrationBuilder.AddColumn<string>(
                name: "UsePolicy",
                table: "Sys_Tenant",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Extra1",
                table: "Sys_PolicyEnum",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "扩展1")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Extra2",
                table: "Sys_PolicyEnum",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "扩展2")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.AddColumn<string>(
                name: "Extra3",
                table: "Sys_PolicyEnum",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "扩展3")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "UsePolicy",
                table: "Sys_Tenant");

            migrationBuilder.DropColumn(
                name: "Extra1",
                table: "Sys_PolicyEnum");

            migrationBuilder.DropColumn(
                name: "Extra2",
                table: "Sys_PolicyEnum");

            migrationBuilder.DropColumn(
                name: "Extra3",
                table: "Sys_PolicyEnum");

            migrationBuilder.AddColumn<string>(
                name: "DeptID",
                table: "Sys_User",
                type: "varchar(256)",
                maxLength: 256,
                nullable: false,
                defaultValue: "",
                comment: "所属科室")
                .Annotation("MySql:CharSet", "utf8mb4");
        }
    }
}
